<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTeamGoals extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('team_goals', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('user_id')->unsigned()->default(0)->comment('用户 ID');
            $table->integer('amount')->unsigned()->default(0)->comment('资料量');
            $table->integer('effect_mobile')->unsigned()->default(0)->comment('有效电话量');
            $table->integer('intention')->unsigned()->default(0)->comment('意向客户量');
            $table->integer('visit')->unsigned()->default(0)->comment('拜访量');
            $table->integer('order')->unsigned()->default(0)->comment('成单量');
            $table->integer('wechat')->unsigned()->default(0)->comment('微信量');
            $table->timestamp('month')->comment('目标月份');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('team_goals');
    }
}
